package com.ahui.domain;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Objects;

/**
 * @author young
 * @since 2022/8/1
 */
@Data
@AllArgsConstructor
public class Pair<K, V> {
    private K left;
    private V right;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Pair<?, ?> pair = (Pair<?, ?>) o;
        return Objects.equals(left, pair.left) && Objects.equals(right, pair.right);
    }

    @Override
    public int hashCode() {
        return Objects.hash(left, right);
    }
}
